﻿using System;
using System.Collections.Generic;
using System.Text;
using Bbm.Persistence.Serializers;
using NUnit.Framework;

namespace Bbm.Persistence.Cassandra.Tests
{
	[TestFixture]
	public class CassandraTests
	{
		[Test]
		public void BasicTest()
		{
			var config = new CacheConfiguration(new GenericJsonSerializer(), new CassandraStoreFactory("localhost", 9160, "Keyspace1", "Standard1"), null);
			var context = new CacheContext(config);

			var store = context.Access<int>();

			store["1"] = 1;

			Assert.IsTrue(store.ContainsKey("1"));
			Assert.AreEqual(1, store["1"]);

			store.Remove("1");

			Assert.IsFalse(store.ContainsKey("1"));
		}
	}
}
